using SM.core;
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace TVSBH.dir
{
	public class frmDoctor : Form
	{
		private IContainer components = null;
		private GroupBox groupBox1;
		private TextBox txtID;
		private Label label1;
		private TextBox txtName;
		private Label label2;
		private TextBox txtCompany;
		private Label label3;
		private DataGridView dgvDoctor;
		private Button btnDel;
		private Button tSBSave;
		private Button tSBAdd;
		private Button tSBClose;
		private Label label4;
		private TextBox txtAddress;
		private Label label5;
		private TextBox txtPhone;
		private Label label6;
		private TextBox txtAcc;
		private Label label7;
		private BindingNavigator bindingNavigator1;
		private ToolStripLabel bindingNavigatorCountItem;
		private ToolStripButton bindingNavigatorMoveFirstItem;
		private ToolStripButton bindingNavigatorMovePreviousItem;
		private ToolStripSeparator bindingNavigatorSeparator;
		private ToolStripTextBox bindingNavigatorPositionItem;
		private ToolStripSeparator bindingNavigatorSeparator1;
		private ToolStripButton bindingNavigatorMoveNextItem;
		private ToolStripButton bindingNavigatorMoveLastItem;
		private ToolStripSeparator bindingNavigatorSeparator2;
		private PictureBox picSignal;
		private ToolTip toolTip1;
		private DataGridViewTextBoxColumn DoctorID;
		private DataGridViewTextBoxColumn DoctorName;
		private DataGridViewTextBoxColumn DoctorAddress;
		private DataGridViewTextBoxColumn DoctorPhone;
		private DataGridViewTextBoxColumn DoctorCompany;
		private DataGridViewTextBoxColumn Column1;
		private DataGridViewTextBoxColumn Photo;
		private Doctor objDoctor = new Doctor();
		private string PhotoPath = "";
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			this.components = new Container();
			DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(frmDoctor));
			this.groupBox1 = new GroupBox();
			this.picSignal = new PictureBox();
			this.txtAcc = new TextBox();
			this.label7 = new Label();
			this.txtPhone = new TextBox();
			this.label6 = new Label();
			this.txtAddress = new TextBox();
			this.label5 = new Label();
			this.txtCompany = new TextBox();
			this.label3 = new Label();
			this.txtName = new TextBox();
			this.label2 = new Label();
			this.txtID = new TextBox();
			this.label1 = new Label();
			this.dgvDoctor = new DataGridView();
			this.DoctorID = new DataGridViewTextBoxColumn();
			this.DoctorName = new DataGridViewTextBoxColumn();
			this.DoctorAddress = new DataGridViewTextBoxColumn();
			this.DoctorPhone = new DataGridViewTextBoxColumn();
			this.DoctorCompany = new DataGridViewTextBoxColumn();
			this.Column1 = new DataGridViewTextBoxColumn();
			this.Photo = new DataGridViewTextBoxColumn();
			this.btnDel = new Button();
			this.tSBSave = new Button();
			this.tSBAdd = new Button();
			this.tSBClose = new Button();
			this.label4 = new Label();
			this.bindingNavigator1 = new BindingNavigator(this.components);
			this.bindingNavigatorCountItem = new ToolStripLabel();
			this.bindingNavigatorMoveFirstItem = new ToolStripButton();
			this.bindingNavigatorMovePreviousItem = new ToolStripButton();
			this.bindingNavigatorSeparator = new ToolStripSeparator();
			this.bindingNavigatorPositionItem = new ToolStripTextBox();
			this.bindingNavigatorSeparator1 = new ToolStripSeparator();
			this.bindingNavigatorMoveNextItem = new ToolStripButton();
			this.bindingNavigatorMoveLastItem = new ToolStripButton();
			this.bindingNavigatorSeparator2 = new ToolStripSeparator();
			this.toolTip1 = new ToolTip(this.components);
			this.groupBox1.SuspendLayout();
			((ISupportInitialize)this.picSignal).BeginInit();
			((ISupportInitialize)this.dgvDoctor).BeginInit();
			((ISupportInitialize)this.bindingNavigator1).BeginInit();
			this.bindingNavigator1.SuspendLayout();
			base.SuspendLayout();
			this.groupBox1.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.groupBox1.Controls.Add(this.picSignal);
			this.groupBox1.Controls.Add(this.txtAcc);
			this.groupBox1.Controls.Add(this.label7);
			this.groupBox1.Controls.Add(this.txtPhone);
			this.groupBox1.Controls.Add(this.label6);
			this.groupBox1.Controls.Add(this.txtAddress);
			this.groupBox1.Controls.Add(this.label5);
			this.groupBox1.Controls.Add(this.txtCompany);
			this.groupBox1.Controls.Add(this.label3);
			this.groupBox1.Controls.Add(this.txtName);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.txtID);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Location = new System.Drawing.Point(7, 449);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new Size(886, 115);
			this.groupBox1.TabIndex = 0;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Thông tin chi tiết";
			this.picSignal.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.picSignal.BorderStyle = BorderStyle.FixedSingle;
			this.picSignal.Location = new System.Drawing.Point(699, 25);
			this.picSignal.Name = "picSignal";
			this.picSignal.Size = new Size(178, 76);
			this.picSignal.SizeMode = PictureBoxSizeMode.StretchImage;
			this.picSignal.TabIndex = 144;
			this.picSignal.TabStop = false;
			this.toolTip1.SetToolTip(this.picSignal, "Chọn file ảnh chứa chữ ký Bác sĩ\r\n[    File ảnh dạng Bimat  *.bmp  ]");
			this.picSignal.DoubleClick += new EventHandler(this.picSignal_DoubleClick);
			this.txtAcc.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.txtAcc.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.txtAcc.Location = new System.Drawing.Point(455, 79);
			this.txtAcc.Name = "txtAcc";
			this.txtAcc.Size = new Size(238, 22);
			this.txtAcc.TabIndex = 6;
			this.label7.BackColor = Color.FromArgb(255, 255, 192);
			this.label7.BorderStyle = BorderStyle.Fixed3D;
			this.label7.Location = new System.Drawing.Point(367, 79);
			this.label7.Name = "label7";
			this.label7.Size = new Size(85, 22);
			this.label7.TabIndex = 9;
			this.label7.Text = "Tài khoản :";
			this.label7.TextAlign = ContentAlignment.MiddleRight;
			this.txtPhone.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.txtPhone.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.txtPhone.Location = new System.Drawing.Point(455, 53);
			this.txtPhone.Name = "txtPhone";
			this.txtPhone.Size = new Size(238, 22);
			this.txtPhone.TabIndex = 4;
			this.label6.BackColor = Color.FromArgb(255, 255, 192);
			this.label6.BorderStyle = BorderStyle.Fixed3D;
			this.label6.Location = new System.Drawing.Point(367, 53);
			this.label6.Name = "label6";
			this.label6.Size = new Size(85, 22);
			this.label6.TabIndex = 7;
			this.label6.Text = "Điện thoại :";
			this.label6.TextAlign = ContentAlignment.MiddleRight;
			this.txtAddress.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.txtAddress.Location = new System.Drawing.Point(101, 53);
			this.txtAddress.Name = "txtAddress";
			this.txtAddress.Size = new Size(260, 22);
			this.txtAddress.TabIndex = 3;
			this.label5.BackColor = Color.FromArgb(255, 255, 192);
			this.label5.BorderStyle = BorderStyle.Fixed3D;
			this.label5.Location = new System.Drawing.Point(13, 53);
			this.label5.Name = "label5";
			this.label5.Size = new Size(85, 22);
			this.label5.TabIndex = 5;
			this.label5.Text = "Địa chỉ :";
			this.label5.TextAlign = ContentAlignment.MiddleRight;
			this.txtCompany.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.txtCompany.Location = new System.Drawing.Point(101, 79);
			this.txtCompany.Name = "txtCompany";
			this.txtCompany.Size = new Size(260, 22);
			this.txtCompany.TabIndex = 5;
			this.label3.BackColor = Color.FromArgb(255, 255, 192);
			this.label3.BorderStyle = BorderStyle.Fixed3D;
			this.label3.Location = new System.Drawing.Point(13, 79);
			this.label3.Name = "label3";
			this.label3.Size = new Size(85, 22);
			this.label3.TabIndex = 4;
			this.label3.Text = "Nơi công tác :";
			this.label3.TextAlign = ContentAlignment.MiddleRight;
			this.txtName.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.txtName.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.txtName.Location = new System.Drawing.Point(455, 27);
			this.txtName.Name = "txtName";
			this.txtName.Size = new Size(238, 22);
			this.txtName.TabIndex = 2;
			this.label2.BackColor = Color.FromArgb(255, 255, 192);
			this.label2.BorderStyle = BorderStyle.Fixed3D;
			this.label2.Location = new System.Drawing.Point(367, 27);
			this.label2.Name = "label2";
			this.label2.Size = new Size(85, 22);
			this.label2.TabIndex = 2;
			this.label2.Text = "Tên gọi :";
			this.label2.TextAlign = ContentAlignment.MiddleRight;
			this.txtID.BackColor = Color.White;
			this.txtID.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.txtID.Location = new System.Drawing.Point(101, 27);
			this.txtID.Name = "txtID";
			this.txtID.ReadOnly = true;
			this.txtID.Size = new Size(260, 22);
			this.txtID.TabIndex = 1;
			this.label1.BackColor = Color.FromArgb(255, 255, 192);
			this.label1.BorderStyle = BorderStyle.Fixed3D;
			this.label1.Location = new System.Drawing.Point(13, 27);
			this.label1.Name = "label1";
			this.label1.Size = new Size(85, 22);
			this.label1.TabIndex = 0;
			this.label1.Text = "Số hiệu :";
			this.label1.TextAlign = ContentAlignment.MiddleRight;
			this.dgvDoctor.AllowUserToAddRows = false;
			this.dgvDoctor.AllowUserToDeleteRows = false;
			this.dgvDoctor.AllowUserToResizeColumns = false;
			this.dgvDoctor.AllowUserToResizeRows = false;
			dataGridViewCellStyle.BackColor = Color.FromArgb(192, 255, 255);
			dataGridViewCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvDoctor.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle;
			this.dgvDoctor.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.dgvDoctor.BackgroundColor = Color.White;
			this.dgvDoctor.BorderStyle = BorderStyle.Fixed3D;
			this.dgvDoctor.ColumnHeadersHeight = 26;
			this.dgvDoctor.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
			this.dgvDoctor.Columns.AddRange(new DataGridViewColumn[]
			{
				this.DoctorID,
				this.DoctorName,
				this.DoctorAddress,
				this.DoctorPhone,
				this.DoctorCompany,
				this.Column1,
				this.Photo
			});
			this.dgvDoctor.Cursor = Cursors.Hand;
			this.dgvDoctor.EnableHeadersVisualStyles = false;
			this.dgvDoctor.Location = new System.Drawing.Point(7, 36);
			this.dgvDoctor.Name = "dgvDoctor";
			this.dgvDoctor.ReadOnly = true;
			this.dgvDoctor.RowHeadersVisible = false;
			this.dgvDoctor.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			this.dgvDoctor.RowTemplate.DefaultCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvDoctor.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvDoctor.Size = new Size(886, 383);
			this.dgvDoctor.TabIndex = 0;
			this.dgvDoctor.CellEnter += new DataGridViewCellEventHandler(this.dgvNational_CellEnter);
			this.DoctorID.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.DoctorID.DataPropertyName = "ID";
			this.DoctorID.HeaderText = "Số hiệu";
			this.DoctorID.MinimumWidth = 75;
			this.DoctorID.Name = "DoctorID";
			this.DoctorID.ReadOnly = true;
			this.DoctorID.Width = 75;
			this.DoctorName.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.DoctorName.DataPropertyName = "Name";
			this.DoctorName.HeaderText = "Tên gọi";
			this.DoctorName.MinimumWidth = 250;
			this.DoctorName.Name = "DoctorName";
			this.DoctorName.ReadOnly = true;
			this.DoctorName.Width = 250;
			this.DoctorAddress.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.DoctorAddress.DataPropertyName = "Address";
			this.DoctorAddress.HeaderText = "Địa chỉ";
			this.DoctorAddress.Name = "DoctorAddress";
			this.DoctorAddress.ReadOnly = true;
			this.DoctorPhone.DataPropertyName = "Phone";
			this.DoctorPhone.HeaderText = "Điện thoại";
			this.DoctorPhone.Name = "DoctorPhone";
			this.DoctorPhone.ReadOnly = true;
			this.DoctorPhone.Visible = false;
			this.DoctorCompany.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.DoctorCompany.DataPropertyName = "Company";
			this.DoctorCompany.HeaderText = "Nơi công tác";
			this.DoctorCompany.MinimumWidth = 300;
			this.DoctorCompany.Name = "DoctorCompany";
			this.DoctorCompany.ReadOnly = true;
			this.DoctorCompany.Width = 300;
			this.Column1.DataPropertyName = "Acc";
			this.Column1.HeaderText = "Column1";
			this.Column1.Name = "Column1";
			this.Column1.ReadOnly = true;
			this.Column1.Visible = false;
			this.Photo.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Photo.DataPropertyName = "Photo";
			this.Photo.HeaderText = "Photo";
			this.Photo.Name = "Photo";
			this.Photo.ReadOnly = true;
			this.Photo.Visible = false;
			this.btnDel.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnDel.BackColor = SystemColors.ButtonFace;
			this.btnDel.Cursor = Cursors.Hand;
			this.btnDel.FlatAppearance.BorderColor = Color.Gray;
			this.btnDel.FlatStyle = FlatStyle.System;
			this.btnDel.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnDel.ImageAlign = ContentAlignment.MiddleLeft;
			this.btnDel.Location = new System.Drawing.Point(209, 568);
			this.btnDel.Name = "btnDel";
			this.btnDel.Size = new Size(100, 30);
			this.btnDel.TabIndex = 8;
			this.btnDel.Text = "Xoá mục  [ F8 ]";
			this.btnDel.UseVisualStyleBackColor = false;
			this.btnDel.Click += new EventHandler(this.btnDel_Click);
			this.tSBSave.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.tSBSave.BackColor = SystemColors.ButtonFace;
			this.tSBSave.Cursor = Cursors.Hand;
			this.tSBSave.FlatAppearance.BorderColor = Color.Gray;
			this.tSBSave.FlatStyle = FlatStyle.System;
			this.tSBSave.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.tSBSave.ImageAlign = ContentAlignment.MiddleLeft;
//			this.tSBSave.ImeMode = ImeMode.NoControl;
			this.tSBSave.Location = new System.Drawing.Point(108, 568);
			this.tSBSave.Name = "tSBSave";
			this.tSBSave.Size = new Size(100, 30);
			this.tSBSave.TabIndex = 7;
			this.tSBSave.Text = "Ghi nhận  [ F6 ]";
			this.tSBSave.UseVisualStyleBackColor = false;
			this.tSBSave.Click += new EventHandler(this.tSBSave_Click);
			this.tSBAdd.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.tSBAdd.BackColor = SystemColors.ButtonFace;
			this.tSBAdd.Cursor = Cursors.Hand;
			this.tSBAdd.FlatAppearance.BorderColor = Color.Gray;
			this.tSBAdd.FlatStyle = FlatStyle.System;
			this.tSBAdd.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.tSBAdd.ImageAlign = ContentAlignment.MiddleLeft;
//			//this.tSBAdd.ImeMode = ImeMode.NoControl;
			this.tSBAdd.Location = new System.Drawing.Point(7, 568);
			this.tSBAdd.Name = "tSBAdd";
			this.tSBAdd.Size = new Size(100, 30);
			this.tSBAdd.TabIndex = 9;
			this.tSBAdd.Text = "Thêm mới  [ F4 ]";
			this.tSBAdd.UseVisualStyleBackColor = false;
			this.tSBAdd.Click += new EventHandler(this.tSBAdd_Click);
			this.tSBClose.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.tSBClose.BackColor = SystemColors.ButtonFace;
			this.tSBClose.Cursor = Cursors.Hand;
			this.tSBClose.FlatAppearance.BorderColor = Color.Gray;
			this.tSBClose.FlatStyle = FlatStyle.System;
			this.tSBClose.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.tSBClose.ImageAlign = ContentAlignment.MiddleLeft;
//			this.tSBClose.ImeMode = ImeMode.NoControl;
			this.tSBClose.Location = new System.Drawing.Point(796, 568);
			this.tSBClose.Name = "tSBClose";
			this.tSBClose.Size = new Size(97, 30);
			this.tSBClose.TabIndex = 10;
			this.tSBClose.Text = "Thoát [ ESC ]";
			this.tSBClose.UseVisualStyleBackColor = false;
			this.tSBClose.Click += new EventHandler(this.tSBClose_Click);
			this.label4.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.label4.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label4.Location = new System.Drawing.Point(7, 9);
			this.label4.Name = "label4";
			this.label4.Size = new Size(886, 24);
			this.label4.TabIndex = 9;
			this.label4.Text = "DANH MỤC BÁC SĨ";
			this.label4.TextAlign = ContentAlignment.MiddleCenter;
			this.bindingNavigator1.AddNewItem = null;
			this.bindingNavigator1.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.bindingNavigator1.AutoSize = false;
			this.bindingNavigator1.BackColor = SystemColors.ButtonFace;
			this.bindingNavigator1.CountItem = this.bindingNavigatorCountItem;
			this.bindingNavigator1.CountItemFormat = "/ {0}";
			this.bindingNavigator1.DeleteItem = null;
			this.bindingNavigator1.Dock = DockStyle.None;
			this.bindingNavigator1.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.bindingNavigator1.GripStyle = ToolStripGripStyle.Hidden;
			this.bindingNavigator1.Items.AddRange(new ToolStripItem[]
			{
				this.bindingNavigatorMoveFirstItem,
				this.bindingNavigatorMovePreviousItem,
				this.bindingNavigatorSeparator,
				this.bindingNavigatorPositionItem,
				this.bindingNavigatorCountItem,
				this.bindingNavigatorSeparator1,
				this.bindingNavigatorMoveNextItem,
				this.bindingNavigatorMoveLastItem,
				this.bindingNavigatorSeparator2
			});
			this.bindingNavigator1.Location = new System.Drawing.Point(7, 420);
			this.bindingNavigator1.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
			this.bindingNavigator1.MoveLastItem = this.bindingNavigatorMoveLastItem;
			this.bindingNavigator1.MoveNextItem = this.bindingNavigatorMoveNextItem;
			this.bindingNavigator1.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
			this.bindingNavigator1.Name = "bindingNavigator1";
			this.bindingNavigator1.PositionItem = this.bindingNavigatorPositionItem;
			this.bindingNavigator1.RenderMode = ToolStripRenderMode.Professional;
			this.bindingNavigator1.Size = new Size(886, 25);
			this.bindingNavigator1.TabIndex = 143;
			this.bindingNavigator1.Text = "bindingNavigator1";
			this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
			this.bindingNavigatorCountItem.Size = new Size(28, 22);
			this.bindingNavigatorCountItem.Text = "/ {0}";
			this.bindingNavigatorCountItem.ToolTipText = "Total number of items";
			this.bindingNavigatorMoveFirstItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
//			//this.bindingNavigatorMoveFirstItem.Image = (Image)componentResourceManager.GetObject("bindingNavigatorMoveFirstItem.Image");
			this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem";
			this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true;
			this.bindingNavigatorMoveFirstItem.Size = new Size(23, 22);
			this.bindingNavigatorMoveFirstItem.Text = "Move first";
			this.bindingNavigatorMovePreviousItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
//			//this.bindingNavigatorMovePreviousItem.Image = (Image)componentResourceManager.GetObject("bindingNavigatorMovePreviousItem.Image");
			this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem";
			this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true;
			this.bindingNavigatorMovePreviousItem.Size = new Size(23, 22);
			this.bindingNavigatorMovePreviousItem.Text = "Move previous";
			this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator";
			this.bindingNavigatorSeparator.Size = new Size(6, 25);
			this.bindingNavigatorPositionItem.AccessibleName = "Position";
			this.bindingNavigatorPositionItem.AutoSize = false;
			this.bindingNavigatorPositionItem.BackColor = SystemColors.ButtonFace;
			this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
			this.bindingNavigatorPositionItem.Size = new Size(50, 23);
			this.bindingNavigatorPositionItem.Text = "0";
			this.bindingNavigatorPositionItem.TextBoxTextAlign = HorizontalAlignment.Center;
			this.bindingNavigatorPositionItem.ToolTipText = "Current position";
			this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1";
			this.bindingNavigatorSeparator1.Size = new Size(6, 25);
			this.bindingNavigatorMoveNextItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
//			//this.bindingNavigatorMoveNextItem.Image = (Image)componentResourceManager.GetObject("bindingNavigatorMoveNextItem.Image");
			this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem";
			this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true;
			this.bindingNavigatorMoveNextItem.Size = new Size(23, 22);
			this.bindingNavigatorMoveNextItem.Text = "Move next";
			this.bindingNavigatorMoveLastItem.DisplayStyle = ToolStripItemDisplayStyle.Image;
			////this.bindingNavigatorMoveLastItem.Image = (Image)componentResourceManager.GetObject("bindingNavigatorMoveLastItem.Image");
			this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem";
			this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true;
			this.bindingNavigatorMoveLastItem.Size = new Size(23, 22);
			this.bindingNavigatorMoveLastItem.Text = "Move last";
			this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
			this.bindingNavigatorSeparator2.Size = new Size(6, 25);
			base.AutoScaleDimensions = new SizeF(7f, 15f);
			//base.AutoScaleMode = AutoScaleMode.Font;
			base.ClientSize = new Size(900, 600);
			base.Controls.Add(this.bindingNavigator1);
			base.Controls.Add(this.label4);
			base.Controls.Add(this.tSBClose);
			base.Controls.Add(this.btnDel);
			base.Controls.Add(this.tSBSave);
			base.Controls.Add(this.tSBAdd);
			base.Controls.Add(this.dgvDoctor);
			base.Controls.Add(this.groupBox1);
			this.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			//base.Icon = (System.Drawing.Icon)componentResourceManager.GetObject("$this.Icon");
			//base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
			base.KeyPreview = true;
			base.Name = "frmDoctor";
			base.ShowInTaskbar = false;
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = "DANH MỤC BÁC SÍ";
			base.Load += new EventHandler(this.frmNational_Load);
			base.KeyDown += new KeyEventHandler(this.frmNational_KeyDown);
			this.groupBox1.ResumeLayout(false);
			this.groupBox1.PerformLayout();
			((ISupportInitialize)this.picSignal).EndInit();
			((ISupportInitialize)this.dgvDoctor).EndInit();
			((ISupportInitialize)this.bindingNavigator1).EndInit();
			this.bindingNavigator1.ResumeLayout(false);
			this.bindingNavigator1.PerformLayout();
			base.ResumeLayout(false);
		}
		public frmDoctor()
		{
			this.InitializeComponent();
		}
		private void frmNational_Load(object sender, EventArgs e)
		{
			this.objDoctor.loadGridView(this.dgvDoctor, this.bindingNavigator1);
		}
		private void tSBAdd_Click(object sender, EventArgs e)
		{
			this.PhotoPath = "";
			this.txtID.Text = "-:-";
			this.txtName.Text = "";
			this.txtAddress.Text = "";
			this.txtPhone.Text = "";
			this.txtCompany.Text = "";
			this.txtAcc.Text = "";
			this.txtName.Focus();
		}
		private void tSBSave_Click(object sender, EventArgs e)
		{
			if (this.txtName.Text.Trim() == "")
			{
				MessageBox.Show("Bạn chưa nhập đầy đủ thông tin về Bác sỹ", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
			}
			else
			{
				if (this.objDoctor.action(this.txtID.Text, this.txtName.Text, this.txtAddress.Text, this.txtPhone.Text, this.txtCompany.Text, this.txtAcc.Text, this.PhotoPath) != 0)
				{
					MessageBox.Show("Có lỗi xảy ra trong quá trình cập nhật thông tin", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}
				else
				{
					this.objDoctor.loadGridView(this.dgvDoctor, this.bindingNavigator1);
					this.tSBAdd.Focus();
				}
			}
		}
		private void btnDel_Click(object sender, EventArgs e)
		{
			if (this.txtID.Text.Trim() == "" || this.txtName.Text.Trim() == "")
			{
				MessageBox.Show("Bạn chưa nhập đầy đủ số hiệu và tên gọi của Bác Sỹ", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
			}
			else
			{
				if (MessageBox.Show("Bạn có chắc chắn muốn xoá mục được chọn không", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
				{
					if (this.objDoctor.CheckEmpExitstInOutBill(this.txtID.Text) != "")
					{
						MessageBox.Show("Thông tin về Bác Sỹ hiện tại có liên quan đến đơn thuốc\r\n\r\nBạn không thể xoá bỏ thông tin này.", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					}
					else
					{
						if (this.objDoctor.delItem(this.txtID.Text) != 0)
						{
							MessageBox.Show("Có lỗi xảy ra trong quá trình cập nhật thông tin", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
						}
						else
						{
							this.objDoctor.loadGridView(this.dgvDoctor, this.bindingNavigator1);
							this.tSBAdd.Focus();
						}
					}
				}
			}
		}
		private void tSBClose_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void dgvNational_CellEnter(object sender, DataGridViewCellEventArgs e)
		{
			if (e.RowIndex > -1)
			{
				try
				{
					this.txtID.Text = this.dgvDoctor.Rows[e.RowIndex].Cells["DoctorID"].Value.ToString();
					this.txtName.Text = this.dgvDoctor.Rows[e.RowIndex].Cells["DoctorName"].Value.ToString();
					this.txtAddress.Text = this.dgvDoctor.Rows[e.RowIndex].Cells["DoctorAddress"].Value.ToString();
					this.txtPhone.Text = this.dgvDoctor.Rows[e.RowIndex].Cells["DoctorPhone"].Value.ToString();
					this.txtCompany.Text = this.dgvDoctor.Rows[e.RowIndex].Cells["DoctorCompany"].Value.ToString();
					this.txtAcc.Text = this.dgvDoctor.Rows[e.RowIndex].Cells["Column1"].Value.ToString();
					this.picSignal.Image = Image.FromFile(this.dgvDoctor.Rows[e.RowIndex].Cells["Photo"].Value.ToString());
				}
				catch
				{
				}
			}
		}
		private void frmNational_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.F4)
			{
				this.tSBAdd.PerformClick();
			}
			else
			{
				if (e.KeyCode == Keys.F6)
				{
					this.tSBSave.PerformClick();
				}
				else
				{
					if (e.KeyCode == Keys.F8)
					{
						this.btnDel.PerformClick();
					}
					else
					{
						if (e.KeyCode == Keys.Escape)
						{
							base.Close();
						}
					}
				}
			}
		}
		private void picSignal_DoubleClick(object sender, EventArgs e)
		{
			OpenFileDialog openFileDialog = new OpenFileDialog();
			openFileDialog.Filter = "Image Files(*.BMP)|*.BMP";
			openFileDialog.FilterIndex = 1;
			openFileDialog.RestoreDirectory = true;
			if (openFileDialog.ShowDialog() == DialogResult.OK)
			{
				if (openFileDialog.FileName != null)
				{
					this.PhotoPath = openFileDialog.FileName;
					this.picSignal.Image = Image.FromFile(openFileDialog.FileName);
				}
			}
		}
	}
}
